package Study;

import java.util.ArrayList;
import java.util.LinkedList;

public class Demo6 {

    public static void main(String[] args) {

        ArrayList<Object> arrayList = new ArrayList<Object> ();

        arrayList.add ("张三");
        arrayList.add ("李四");
        arrayList.add ("王二");

        for (Object o : arrayList) {
            System.out.println (o);
        }

        Object o1 = arrayList.set (1, "新增");

        System.out.println ("+++++++++++=");


        for (Object o : arrayList) {
            System.out.println (o);
        }


        System.out.println ("=====================linkedlist");

        LinkedList<Object> linkedList = new LinkedList<Object> ();

        linkedList.add ("张三");
        linkedList.add ("李四");
        linkedList.add ("王二");

        for (Object o : linkedList) {
            System.out.println (o);
        }

        Object o = linkedList.get (1);

        System.out.println (o);


    }

}
